package abio.XasML.util
{
	import flash.display.Sprite;
	import flash.events.Event;
	
	public class tween
	{
		public function tween()
		{
		}

		static public function delayedCall(frame:int, func:Function, ...args):void{
			var tempSprite:Sprite=new Sprite();
			var tempFrame:int=0;
			tempSprite.addEventListener(Event.ENTER_FRAME, function ENTER_FRAME(e:Event):void{
				tempFrame++
				if(tempFrame>=frame){
					tempSprite.removeEventListener(Event.ENTER_FRAME, ENTER_FRAME);
					func.apply(null, args);
				}
			});
		}
	}
}